# -*- coding: UTF-8 -*-

import direct.directbase.DirectStart
import direct.showbase.DirectObject as DO
import game.game_main
import panda3d.core  
# 游戏场景边界

class P3dGame(DO.DirectObject):
    ###################################################
    # init game
    def __init__(self):
        self.CTrav = panda3d.core.CollisionTraverser()
        self._p3dgame = game.game_main.GameMain(self)
        #每帧调用的主循环
        self._p3dgame.GameInit()
        self.mainLoopTask = taskMgr.add(self.mainLoop, "mainLoop")
         
    def mainLoop(self, task): 
        count_1 = self._p3dgame.GameRun(task)
        return count_1
############################################
game = P3dGame()
run ()